
import {CHANGE_PRO_LIST, CHANGE_BANNER_LIST} from '../types'

// 一个状态模块就是一个 reducer
const proreducer =(state = {proList:[],bannerlist :[]},action)=>{
    const {type,payload} = action
    switch(type){
        case CHANGE_PRO_LIST:
            return {...state, proList:payload}
        case CHANGE_BANNER_LIST:
            return {...state, bannerlist:payload}
        default:
            return state
    }
}
export default proreducer